<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>违章查询</title>
    <script th:src="@{/js/jquery.js}"></script>

    <script language="JavaScript" type="text/javascript">


        //写入下拉框中的年份和月份
        function initialYearAndMonth() {
            //写入最近3年
            var yearObj = document.getElementById("selYears");
            var year = (new Date()).getFullYear();
            for (var i = 0; i <= 2; i++) {
                var opObj = new Option(year - i, year - i);
                yearObj.options[i] = opObj;
            }

            //写入 12 月
            var monthObj = document.getElementById("selMonths");
            var opObj = new Option("全部", "全部");
            monthObj.options[0] = opObj;
            for (var i = 1; i <= 12; i++) {
                var opObj = new Option(i, i);
                monthObj.options[i] = opObj;
            }
        }
    </script>
</head>
<body onload="initialYearAndMonth();">
<div>
    <!-- 摄像头位置 -->
    <div>摄像头位置：
        <select class="select_search">
            <option>全部</option>
            <option>大门岗</option>
            <option>1号楼</option>
            <option>2号楼</option>
        </select>
    </div>

    <!-- 拍摄日期 -->
    <div>
        <select class="select_search" id="selYears">
        </select>
        年
        <select class="select_search" id="selMonths">
        </select>
        月
    </div>
</div>
</body>
</html>